Repository navigation
fix(studio): every retired pillar address lands on its new page in one redirect; the pillar-era code with no reader goes - #37383
Draft
objectstack-fleet[bot] wants to merge 5 commits into
Conversation
Claude-Session: https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz Co-authored-by: Claude <noreply@anthropic.com>
… one-hop redirect table Claude-Session: https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz Co-authored-by: Claude <noreply@anthropic.com>
…address in its own bullet Claude-Session: https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz Co-authored-by: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #36909
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
No Studio pillar draws a page any more. This PR makes the route, not the builder, answer every retired pillar address, and deletes what the redesign left with no reader.
1. One redirect table, mounted on the route (
studioPillarRedirectModel.ts,StudioPillarRedirect.tsx,StudioRoute.tsx)./studio/PACKAGEand/studio/PACKAGE/:tabnow renderStudioPillarRedirect. A retired pillar address redirects once; any other segment renders the builder (the sharing overviewowd, or the not-found state)./studio/PACKAGE,/studio/PACKAGE/data/studio/PACKAGE/metadata/object?package=PACKAGE/data?surface=object:NAME(all three spellings,?action=kept)/studio/PACKAGE/metadata/object/NAME?package=PACKAGE/data?changes=review(the server'sstudioChangesReviewLink)/studio/PACKAGE/metadata/object?changes=review&package=PACKAGE/automations[?surface=flow:NAME]/metadata/flow/NAME?package=PACKAGE/access[?surface=permission:NAME / owd:overview]/owd/interfaces[?…]/studio/~organd every/studio/~org/…/studio/~org/metadata/flow[/NAME]?source=runtimeA base's
.custompair keeps each pillar's old rule (Data and Automations in the pair's area; Access and Interfaces on the base).2. One hop (carry item from 7157423170). Every target in the area is put where the area would put it (
settledAreaAddress, built on a newstudioAddressPartsparser instudioAddress.ts), so the area never redirects a second time. Before:/datatook two redirects, bare/studio/PACKAGEthree,/studio/~orgtwo. The publish toast's "Open Access" and the Changes sheet's link to a permission set now open the set's own page instead of the old Access address.3. Removed, with every reader gone (all in
@object-ui/app-shell,private: true, last published 18.2.0 — nothing published narrows):AREA_PILLAR_FOR_TYPE,areaItemPillarPath,studioPillarItemPath(metadataArea.ts);StudioMetadataArea's pillar redirect branch.STUDIO_ITEM_PILLAR(empty since Studio 重构(3-1):流程设计器在元数据地址上右侧全屏打开,去掉流程左侧列表,流程类型切到新地址 #36903),studioItemPillar,studioPillarItemAddress,studioSurfaceQuery,StudioItemOptions.spelling(studioAddress.ts).studioItemPathnow always returns the metadata address.STUDIO_ORG_SCOPE_PILLAR(studioAddress.ts, itsstudioScope.tsre-export and the package entry). Kept only as data where a redirect needs it: the literal'automations'inside the redirect table.STUDIO_HOME_PILLARfrom the package entry (the console no longer reads it). It stays inside app-shell:studioHomePath/studioChangesReviewPathmirror the server's/data?changes=reviewlink, which this card may not change.?surface=mirror half and the capture half with it (useSurfaceDeepLink,useSurfaceDeepLinkCapture,useSurfaceDeepLinkMirror,parseSurfaceTarget,resolveSurfaceDeepLink) and their test file.useSurfaceActionDeepLinkand the qualifier keys stay (the object designer and the redirects read them).useRequestedSurface,SurfaceRequestand therequestedstate (carry item: no reader since feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168).useSurfaceNavigator+SurfaceDeepLinkProviderstay: the Changes sheet's security block uses them.StudioDesignSurface: the in-surface Data / Automations / Interfaces redirects,PILLARS, the Access landing branch,PILLAR_FOR_SURFACE_TYPE, and the pillar re-entry counter whose value nothing read.studioMenuModel.tsneeded only the sharing overview's section, not a pillar map:PILLAR_TYPEwent; the menu marks nothing current on a retired address (it never draws one).4.
studio.app.ts: no change needed. All 15metadata:resource/metadata:directoryentries were walked through the console's real path (/apps/studio/metadata/TYPE?package=PACKAGE→setupMetadataStudioPath): each lands on/studio/PACKAGE/metadata/TYPE?package=PACKAGE(or~allwith no package), a settled area address, none on a pillar. Reading in Verification.5. Card item 3 (
engine.studio.pillar.*) was already gone on main (the claim's Premise). This diff removes no translation call site;ui/scripts/check-i18n-dead-keys.mjsexits 0.Tests
Pins (each ablated, below):
studioPillarRedirectModel.test.tswalks 22 old addresses (every package pillar, bare package, a.custompair, every~orgaddress, the three?surface=spellings) to their literal targets, plus the Access mapping;studioAddress.test.tsholds everySTUDIO_ITEM_TYPESrow'sredirectsToequal to what the table returns for each spelling. Route-level:StudioRoute.metadataArea-28561.test.tsxwalks 14 old addresses through the realstudioRoutesand the real redirect./datasingle hop —the old /data address reaches the object list in one redirect(the area'sareaLocationRedirectanswers null for the target); route-level, the location probe records exactly[old, new]./owd,/owd?object=…, area addresses and an unknown segment are not redirected (pure and route-level: the probe records[url]only).Updated: 37 app-shell surface tests now mount the console's route shape (
StudioPillarRedirectaround the builder on:tab); the console route tests expect the new landings; the publish toast test expects the permission set list.Acceptance notes
Not filed (dead code / drift, no defect class); carrier: none.
studioHomePathcallers (command palette, app no-access state, AI chat page,appRoute,PackagesPage,PackageCustomizationsPanel) andsetupMetadataRedirect'spackagedAutomationStudioPath/packagedActionsStudioPath(two hops for those legacy Setup bookmarks). Left alone: two of those files belong to an in-flight branch, and the address they write still works.StudioAiCopilot) still reads:taband?surface=as its pillar context (cloud#1610 contract); on current pages it reads the area path instead.~orgnon-area fallback and its pair→base redirect for owd/unknown segments; the route no longer reaches the first.Finding for the seat (class a, user-visible misleading text), not fixed here: the not-found state at
/studio/PACKAGE/bogus_pillarsays "pick Data, Automations, Interfaces, Access or All metadata above" (engine.studio.notFound.pillar, en and zh) — none of those exist any more.First read (by risk)
ui/packages/app-shell/src/views/studio-design/studioPillarRedirectModel.ts— the table; the.custompair rules and the~orgcatch-all.ui/apps/console/src/components/StudioRoute.tsx— the two routes that now render the redirect, and the lazy boundary it rides.ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx— the removed in-surface redirects and therequestSurfacepermission branch.Verification
Two-minute check: open
/studio/com.example.showcase/data?changes=reviewin the Console (OS_PORT=3000 pnpm dev, Console on :5180). Expected: the address bar shows/studio/com.example.showcase/metadata/object?changes=review&package=com.example.showcase, the Objects list is open, and the Changes drawer is open over it.All readings below are on tree
26ec30e1(the rebased head), byte-identical to the pushed head2322b402(git diff --quietbetween them exits 0; see Process notes).Type-check
pnpm --filter @object-ui/app-shell type-check(both programs,tsconfig.jsonandtsconfig.test.json):VERDICT command-exit 0, 0error TS.pnpm --filter @object-ui/console type-check:VERDICT command-exit 0, 0error TS(run on the pre-rebase head3a7bc226; the rebase brought no console change).Tests
3a7bc226+ the guard fix:Test Files 1 failed | 2429 passed | 1 skipped (2431),Tests 1 failed | 23308 passed. The one failure wasstudioAddress.guard.test.ts(my parse prefix spelled the Studio root outsidestudioAddress.ts); fixed bystudioAddressParts, then that guard passes.26ec30e1:vitest run packages/app-shell/src/views/studio-design packages/app-shell/src/views/metadata-admin packages/app-shell/src/console apps/console/src/components→Test Files 1442 passed (1442),Tests 14059 passed | 1 skipped.studioPillarRedirectModel.test.ts+StudioRoute.metadataArea-28561.test.tsx→ 64 tests pass.Ablations (one per pin; each via `scripts/ablation-replace.mjs`, anchor hit x1, mutation landed on disk, restored to HEAD blob `85ed9932ab4b`, `git diff HEAD` empty after)
dataPillarRedirectinstead: red, exactly the Automations rows — 4 instudioPillarRedirectModel.test.tsand 2 route-level ones./datasingle hop —settledAreaAddress(...)dropped from the Data case:Tests 14 failed | 50 passed (64), the one-hop pinthe old /data address reaches the object list in one redirectamong them, and every route-level/dataand bare-package row (the probe saw a second hop).default:arm redirects to the object list instead ofnull:Tests 8 failed | 56 passed (64): all pure and route-level CONTROL cases, plus the/access?surface=owd:overviewrow (its/owdtarget then redirects again).studio.app.ts→Test Files 3 passed,Tests 66 passed.`studio.app.ts` walk (scratch test, not committed)
Each
metadata:resource/metadata:directoryentry through/apps/studio/metadata/TYPE?package=PACKAGE→setupMetadataStudioPath, thenareaLocationRedirecton the result: 15 of 15 land on/studio/PACKAGE/metadata/TYPE?package=PACKAGE(directory:/studio/PACKAGE/metadata?package=PACKAGE), sectionmetadata, settled (no second redirect). With no package: 15 of 15 on/studio/~all/metadata/TYPE, settled. Types: object, app, view, page, dashboard, report, dataset, action, hook, flow, agent, tool, skill, email_template.Gates
pnpm check:test-source-aliasexit 0;uipnpm check:i18n-keysexit 0;node scripts/pm/overlap-check.mjsVERDICT clean exit 0against origin/main and open PRs feat(studio): 全部类型 All types ends the 高级 fold, and the type directory lists every type a package could hold #37380, feat(studio): a dashboard list's New opens the app's design mode on its dashboards #37368, feat(console): a 「⋯」 package menu in Studio's top bar; Import on Setup → Packages #37362 (and earlier fix(console): "customized" means overrides + extensions everywhere; Setup → Packages names arrangements apart #37351, fix(studio): a permission set's review link opens the draft review on its matrix page #37347, fix(studio): a customization pair's dashboard or report opens in its base app's edit state #37348).node ui/scripts/check-i18n-dead-keys.mjsexit 0; the diff removes no translation call site.node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 2 anchors judged, 0 lost.dispatch-gates --commands: 38 derived families. 37 exit 0 locally (list in the report).pnpm check:type-check-debtis NOT MEASURED locally: the first run hit my 500 s timeout while waiting on the verify lock my own test run held (exit 124, not a red); CI's run is the reading.pnpm check:nul-bytesexit 0.Process notes
3a7bc226) went out before I re-ran the three pre-push gates; I ran them on that head right after (all exit 0).--force-with-lease. I did not retry it. Instead the branch keeps its pushed history, mergesorigin/main(1691563a) and replays the two later commits; the resulting tree is byte-identical to the rebased, tested tree.Generated by Claude Code